﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditCommitteeMemberUserControl.ascx.cs"
    Inherits="JM.JCY.SharePointComponent.Committee.EditCommitteeMember.EditCommitteeMemberUserControl" %>
<script src="/_layouts/JM.JCY.Resource/TinyMCE/jscripts/tiny_mce/jquery.tinymce.js"
    type="text/javascript"></script>
<style type="text/css">
    form.cmxform
    {
        width: 50em;
    }
    em.error
    {
        background: url("/_layouts/JM.JCY.Resource/images/unchecked.gif") no-repeat 0px 0px;
        padding-left: 16px;
    }
    em.success
    {
        background: url("/_layouts/JM.JCY.Resource/images/checked.gif") no-repeat 0px 0px;
        padding-left: 16px;
    }
    
    form.cmxform label.error
    {
        margin-left: auto;
        width: 250px;
    }
    em.error
    {
        color: black;
    }
    #warning
    {
        display: none;
    }
    
    table.ms-rtetoolbarmenu
    {
        width: 100%;
    }
    
    iframe.ms-rtelong
    {
        width: 100%;
    }
    .style1
    {
        height: 20px;
    }
    
    .countLabel
    {
        color: Gray;
        font-style: italic;
    }
    
    .storageBox
    {
        display: none;
    }
    
    .copiedOption
    {
        background-color: Yellow;
    }
</style>
<script src="/_layouts/JM.JCY.Resource/scripts/jQuery.dualListBox-1.3.js" language="javascript"
    type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    function getClientId() {
        var paraId1 = '<%= box1View.ClientID %>';
        var paraId2 = '<%= box2View.ClientID %>';
        return { Id1: paraId1, Id2: paraId2 };
    }


    $(function () {

        $.configureBoxes();

    });

    $(document).ready(function () {
        //ignore enter command
        $(function () {
            $("input[type=text]").keydown(function () {
                return (event.keyCode != 13);
            });
        });

        //for tinymce - custom richtexteditor
        $('textarea.tinymce').tinymce({
            // Location of TinyMCE script
            script_url: '/_layouts/JM.JCY.Resource/TinyMCE/jscripts/tiny_mce/tiny_mce.js',

            // General options
            theme: "advanced",
            plugins: "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

            // Theme options
            //theme_advanced_buttons1: "cut,copy,paste,removeformat,|,undo,redo,|,tablecontrols,|,link,unlink,image,code",
            theme_advanced_buttons2: "fontsizeselect,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,numlist,bullist,outdent,indent",
            theme_advanced_buttons3: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            //theme_advanced_statusbar_location : "bottom",
            theme_advanced_resizing: false,

            // Example content CSS (should be your site CSS)
            content_css: "css/content.css",

            // Drop lists for link/image/media/template dialogs
            template_external_list_url: "lists/template_list.js",
            external_link_list_url: "lists/link_list.js",
            external_image_list_url: "lists/image_list.js",
            media_external_list_url: "lists/media_list.js"
        });

        // remove committee
        var lbdelete = $("#<%= lkbRemove.ClientID %>");
        lbdelete.live('click', function () {

            showConfirm('', '请确认要删除被选中的专题小组，一旦删除将无法恢复?', RemoveCommittee, null, true);
            return false;
        });

    });


    function RemoveCommittee() {
        __doPostBack('DeleteCommittee', '');
    }

</script>
<div>
    <div>
        <table class="main">
            <tr>
                <td valign="top" runat="server" id="tdContent">
                    <table class="content" width="98%">
                        <tr>
                            <td style="padding: 5px;">
                                <table width="100%" class="title">
                                    <tr>
                                        <td width="60%">
                                            <h2 class="title">
                                                编辑专题小组</h2>
                                        </td>
                                        <td align="right" width="40%">
                                           <img src="/_layouts/JM.JCY.Resource/images/delete.png"/><asp:LinkButton ID="lkbRemove" runat="server">删除该专题小组</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <table width="100%" class="form">
                                    <tr>
                                        <td width="10%">
                                            <b>名称</b>
                                        </td>
                                        <td width="1%">
                                            :
                                        </td>
                                        <td>
                                            <asp:Label ID="lblName" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            描述
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <textarea id="ttaDesc" name="ttaDesc" rows="10" cols="80" style="width: 100%"
                                                class="tinymce" runat="server"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>添加成员</b> <span class="mandatory">*</span>
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <table width="100%" border="0">
                                                <tr>
                                                    <td width="40%" valign="bottom" style='padding-left: 0px; padding-right: 0px' class="style1">
                                                        所有人员
                                                    </td>
                                                    <td width="20%" style='padding-left: 0px; padding-right: 0px' class="style1">
                                                        &nbsp;
                                                    </td>
                                                    <td valign="bottom" width="40%" style='padding-left: 0px; padding-right: 0px' class="style1">
                                                        添加人员
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style='padding-left: 0px; padding-right: 0px'>
                                                        <input type="text" id="box1Filter" style="width: 100%" />
                                                        <select runat="server" id="box1View" multiple="true" style="height: 150px; width: 100%;">
                                                        </select><br />
                                                        <span id="box1Counter" class="countLabel"></span>
                                                        <select id="box1Storage">
                                                        </select>
                                                    </td>
                                                    <td valign="bottom" align="center" style='padding-left: 0px; padding-right: 0px'>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <button id="allTo2" type="button">
                                                                        &nbsp;>>&nbsp;</button>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <button id="allTo1" type="button">
                                                                        &nbsp;<<&nbsp;</button>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                    <td style='padding-left: 0px; padding-right: 0px'>
                                                        <input type="text" id="box2Filter" style="width: 100%" /><br />
                                                        <select name="box2View" runat="server" id="box2View" multiple="true" style="width: 100%;
                                                            height: 150px">
                                                        </select><br />
                                                        <br />
                                                        <span id="box2Counter" class="countLabel"></span>
                                                        <select id="box2Storage">
                                                        </select>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3" class="button" align="right">
                                            <asp:ImageButton ID="imgSavePublish" runat="server" ImageUrl="~/_layouts/JM.JCY.Resource/images/save.png"
                                                OnClick="imgSavePublish_Click" />
                                            <asp:ImageButton ID="imgCancel" runat="server" ImageUrl="~/_layouts/JM.JCY.Resource/images/cancel.png"
                                                OnClick="imgCancel_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
